package com.example.bootservice;

import com.example.bootservice.util.ApplicationContextUtil;
import com.example.bootservice.util.JdbcUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.sql.SQLException;

@SpringBootApplication
@MapperScan({"com.**.dao.**"})
public class BootServiceApplication {

    public static void main(String[] args) throws SQLException {
        ApplicationContext context =  SpringApplication.run(BootServiceApplication.class, args);
        ApplicationContextUtil.setApplicationContext(context);
        System.out.println("启动成功......");
    }
}
